Skip to content

fleet: orgs registry, App-JWT sync and fleet orgs list (#8884) - #14023

Merged
developing-today-fleet[bot] merged 3 commits into
mainfrom
queue/21511-8884-fleet-orgs
Nov 24, 2026
Merged

developing-today-fleet[bot] merged 3 commits into
mainfrom
queue/21511-8884-fleet-orgs

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Part of #8884

What

  • New crate pkgs/fleet/crates/fleet-orgs: Turso-backed registry (sync_runs, apps, orgs, installations), idempotent upserts, per-app pruning of installations not seen in a successful run, failed runs recorded as failed with prior rows kept.
  • Sync uses each App's JWT against GET /app and GET /app/installations, following every Link: rel="next". No OAuth org reads.
  • fleet orgs list table and --json, filters --app (GitHub App slug), --org, --permission NAME[=LEVEL], shows last successful sync time.
  • Capability orgs gated as a full-only feature (fleet feature orgs), domain registered in fleet-registry; docs in docs/verbs.md and doc/fleet/orgs-registry.md.

Verification

  • cd pkgs/fleet && cargo test --offline -p fleet-orgs -p fleet: all pass (126 unit + offline integration + proptest).

Defaults chosen (no question asked; detached)

  • Turso store via HTTP /v2/pipeline, URL from FLEET_ORGS_TURSO_URL, token from secret turso.fleet-orgs-token.
  • App keys: github-app.developing-today-fleet.private-key (app id 5612056, override FLEET_GH_APP_ID), kaneo.github-app-private-key/kaneo.github-app-id, github-app.backup-private-key/github-app.backup-app-id.

Open / deferred

  • fleet orgs list must match the hatch-personal registry doc (104 memberships). Not verifiable offline; needs a live sync.
  • --drift from the original issue body is not implemented; deferred.
{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T02:31:39Z",
    "session_id": "ses_e5df4a0c09bffeoy5vOlMB0I2b",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/fleet/queue-21511-8884-fleet-orgs",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/fleet/queue-21511-8884-fleet-orgs",
      "repo": "developing-today/code",
      "branch": "queue/21511-8884-fleet-orgs",
      "sha": "d3742fd7cd7d7f054a4464cde8b6bf32a1f31a43"
    },
    "auth_subject": "oc-code-08",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Issue scope note: this PR completes the implementation slice and its offline test oracle; it does not close #8884. Live 104-membership verification and --drift remain deferred follow-ups, as listed above.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1b333cd6-79ed-4092-aebc-d5c28985d631
Commits

Reviewing files that changed from the base of the PR and between 8b767a0 and d3ccc82.

Files ignored due to path filters: 1

  • pkgs/fleet/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 19

  • pkgs/fleet/Cargo.toml
  • pkgs/fleet/README.md
  • pkgs/fleet/crates/fleet-orgs/Cargo.toml
  • pkgs/fleet/crates/fleet-orgs/src/cli.rs
  • pkgs/fleet/crates/fleet-orgs/src/github.rs
  • pkgs/fleet/crates/fleet-orgs/src/jwt.rs
  • pkgs/fleet/crates/fleet-orgs/src/lib.rs
  • pkgs/fleet/crates/fleet-orgs/src/link.rs
  • pkgs/fleet/crates/fleet-orgs/src/list.rs
  • pkgs/fleet/crates/fleet-orgs/src/schema.rs
  • pkgs/fleet/crates/fleet-orgs/src/sql.rs
  • pkgs/fleet/crates/fleet-orgs/src/sync.rs
  • pkgs/fleet/crates/fleet-orgs/src/turso.rs
  • pkgs/fleet/crates/fleet-orgs/tests/registry.rs
  • pkgs/fleet/crates/fleet-registry/src/lib.rs
  • pkgs/fleet/crates/fleet/Cargo.toml
  • pkgs/fleet/crates/fleet/src/main.rs
  • pkgs/fleet/doc/fleet/orgs-registry.md
  • pkgs/fleet/docs/verbs.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39

Copy link
Copy Markdown
Member Author

Follow-up verification on e9a565a:

  • cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-orgs --offline: passed (16 unit tests, 8 registry integration tests).
  • cargo run --manifest-path pkgs/fleet/Cargo.toml -p fleet --offline -- orgs --help: passed; help reports the capability included.
  • cargo build --manifest-path pkgs/fleet/Cargo.toml -p fleet --no-default-features --offline plus fleet orgs list: passed; unavailable capability exits 69.
  • Dispatched cargo test --offline -p fleet-orgs -p fleet through Fleet; run: https://github.com/developing-today-forks/fleet/actions/runs/45314408179.

The App-JWT endpoint fixture now verifies both pages and the Bearer token while matching ureq request targets. Org role and repo_count remain nullable because /app/installations does not provide them; populating them would require the prohibited OAuth org reads.

@developing-today-fleet
developing-today-fleet Bot merged commit e0e7e33 into main Nov 24, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the queue/21511-8884-fleet-orgs branch November 24, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fleet orgs: Turso-backed org/App registry + list subcommand

1 participant